import request from '@/utils/request'

// 查询会员权限列表
export function listHlrecord(query) {
  return request({
    url: '/hotel/hlrecord/list',
    method: 'get',
    params: query
  })
}

// 查询会员权限列表根据手机号
export function listHlrecordByPhone(phone) {
  return request({
    url: '/hotel/hlrecord/phone',
    method: 'get',
    params :{
      phone: phone
    }

  })
}


// 新增用户-会员权限
export function addHlrecordForUser(data) {
  console.log("新增用户js")
  return request({
    url: '/hotel/hlrecord/addUser',
    method: 'post',
    data: data
  })
}

// 办理会员-会员权限
export function addHlrecordForMember(data) {
  console.log("办理会员js")
  return request({
    url: '/hotel/hlrecord/addMember',
    method: 'post',
    data: data
  })
}

// 升级会员-会员权限
export function addHlrecordForLevelMember(data) {
  console.log("升级会员js")
  return request({
    url: '/hotel/hlrecord/levelMember',
    method: 'post',
    data: data
  })
}


// 修改会员权限
export function updateHlrecord(data) {
  return request({
    url: '/hotel/hlrecord',
    method: 'put',
    data: data
  })
}

// 删除会员权限
export function delHlrecord(id) {
  return request({
    url: '/hotel/hlrecord/' + id,
    method: 'delete'
  })
}
